Ext.define("wmf.view.product.operation", {
    extend: "wmf.lib.FormPanel",
    alias: "widget.productOperation",
	anchor: '100% 100%',
    border: false,
    autoScroll: true,
    fieldDefaults: {
        labelWidth: 90
    },
    items: [{
    	xtype: 'combo',
 		emptyText:  '请选择...',
 		hiddenName: 'id',
 		autoSelect: true,
 		displayField: 'cmccChannelId',
 		queryMode: 'remote',
 		valueField: 'id',
 		triggerAction: 'all',
 		editable: false,
 		minChars: 0,
		forceSelection : true,
		selectOnFocus : true,
        listeners : {
			'beforerender': function(combo, eOpts){
	    	    combo.store.filter({
	        		//property     : combo.displayField,
	        		property     : 'carrier',
	        		value        : '1',
	        		anyMatch     : true, //optional, defaults to true
	        		caseSensitive: false  //optional, defaults to true
	        	});  
	    	    combo.onLoad();
			}
		},
 		store: 'product.channel1',
        name: "cmccChannelId", 
    	fieldLabel: "移动通道"
    },{
    	xtype: 'combo',
 		emptyText:  '请选择...',
 		hiddenName: 'id',
 		autoSelect: true,
 		displayField: 'unicomChannelId',
 		queryMode: 'remote',
 		valueField: 'id',
 		triggerAction: 'all',
 		editable: false,
 		minChars: 0,
		forceSelection : true,
		selectOnFocus : true,
        listeners : {
			'beforerender': function(combo, eOpts){
	    	    combo.store.filter({
	        		//property     : combo.displayField,
	        		property     : 'carrier',
	        		value        : '2',
	        		anyMatch     : true, //optional, defaults to true
	        		caseSensitive: false  //optional, defaults to true
	        	});  
	    	    combo.onLoad();
			}
		},
 		store: 'product.channel2',
        name: "unicomChannelId", 
        fieldLabel: "联通通道"
    },{
    	xtype: 'combo',
 		emptyText:  '请选择...',
 		hiddenName: 'id',
 		autoSelect: true,
 		displayField: 'telcomChannelId',
 		queryMode: 'remote',
 		valueField: 'id',
 		triggerAction: 'all',
 		editable: false,
 		minChars: 0,
		forceSelection : true,
		selectOnFocus : true,
        listeners : {
			'beforerender': function(combo, eOpts){
	    	    combo.store.filter({
	        		//property     : combo.displayField,
	        		property     : 'carrier',
	        		value        : '3',
	        		anyMatch     : true, //optional, defaults to true
	        		caseSensitive: false  //optional, defaults to true
	        	});  
	    	    combo.onLoad();
			}
		},
 		store: 'product.channel',
        name: "telcomChannelId", 
        fieldLabel: "电信通道"
    },{
    	xtype: 'combo',
 		emptyText:  '请选择...',
 		hiddenName: 'priority',
 		autoSelect: true,
 		displayField: 'name',
 		queryMode: 'local',
 		valueField: 'priority',
 		triggerAction: 'all',
 		editable: false,
 		store: 'product.priority',
        name: "priority", 
        fieldLabel: "优先级"
    },{
    	xtype: 'hidden',
    	name: 'productIds'
    }],
    
	dockedItems: [{
		xtype: 'toolbar',
		dock: 'bottom',
		layout: {
			type: 'hbox',
			alian: 'center',
			flex: 1
		},
		
		defaults: {
			xtype: 'button'
		},
		items: [{
			xtype : 'tbfill'
		},{
			itemId: 'save',
			icon: 'resources/icons/icon_save.png',
			formBind: true,
			text: translations.global.operation.save
		},{
			itemId: 'cancel',
			icon : 'resources/icons/icon_revoke.png',
			text: translations.global.operation.cancel
		}]
	}]
});